f=open('doc20201225.txt','w',encoding='utf-8')
f.write("""# 方法1：
hello='hello'
name='apple'
age=18
weigh=52.5
print(f'{hello},{name},welcome!')

# 方法2：
print('%s,%s,welcome!'%(hello,name))
print('my name is %s,age is %d,weigh is %.2f'%(name,age,weigh))

#方法3
f='我的名字是{1}，我的年龄是{2}，我的体重是{0}'.format(weigh,name,age)
print(f)""")
f.close()